package com.itheima.health.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.health.entity.PageResult;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.exception.MyException;
import com.itheima.health.pojo.Setmeal;

import java.util.List;

/**
 * @program: health_parent
 * @description: 套餐service层
 * @author: HuChunping
 * @create: 2021-01-10 17:54
 **/

public interface SetmealService {
    /**
    * @Description: 添加检查套餐
    * @Param: [setmeal, checkgroupIds]
    * @return: void
    * @Author: HuChunping
    * @Date: 2021/1/10-17:55
    */
    void add(Setmeal setmeal, Integer[] checkgroupIds);

    /**
    * @Description: 查询检查套餐
    * @Param: [queryPageBean]
    * @return: com.itheima.health.entity.PageResult<com.itheima.health.pojo.Setmeal>
    * @Author: HuChunping
    * @Date: 2021/1/10-19:57
    */
    PageResult<Setmeal> findPage(QueryPageBean queryPageBean);

    /**
    * @Description: 通过ia查询套餐
    * @Param: [id]
    * @return: com.itheima.health.pojo.Setmeal
    * @Author: HuChunping
    * @Date: 2021/1/11-11:43
    */
    Setmeal findById(int id);

    /**
    * @Description: 通过套餐id查询勾选中的检查组
    * @Param: [id]
    * @return: java.lang.Integer[]
    * @Author: HuChunping
    * @Date: 2021/1/11-14:51
    */
    List<Integer> findCheckGroupIdsBySetmealId(int id);

    /**
    * @Description: 编辑更新套餐
    * @Param: [setmeal, checkGroupIds]
    * @return: void
    * @Author: HuChunping
    * @Date: 2021/1/11-15:39
    */
    void update(Setmeal setmeal, Integer[] checkGroupIds);

    /**
    * @Description: 通过id删除套餐
    * @Param: [id]
    * @return: void
    * @Author: HuChunping
    * @Date: 2021/1/11-16:40
    */
    void deleteById(int id) throws MyException;

    /**
    * @Description: 查询所有数据库套餐的垃圾图片，便于七牛的垃圾图片移除
    * @Param: []
    * @return: java.util.List<java.lang.String>
    * @Author: HuChunping
    * @Date: 2021/1/12-16:05
    */
    List<String> findImgs();

    /**
    * @Description: 查询所有套餐，用于用户端套餐展示
    * @Param: []
    * @return: java.util.List<com.itheima.health.pojo.Setmeal>
    * @Author: HuChunping
    * @Date: 2021/1/15-17:39
    */
    List<Setmeal> findAll();

    /**
    * @Description: 套餐详情页查询套餐详情
    * @Param: [id]
    * @return: java.util.List<com.itheima.health.pojo.Setmeal>
    * @Author: HuChunping
    * @Date: 2021/1/15-20:01
    */
    Setmeal findDetailById(int id);
}
